package com.lzh.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lzh.mapper.OrdersMapper;
import com.lzh.service.OrderService;
import com.lzh.entity.Orders;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;

@Service
public class OrderServiceImpl extends ServiceImpl<OrdersMapper, Orders> implements OrderService {
    @Override
    public List<Orders> getOrders(String code) {
        List<Orders> list;
        if (!StringUtils.isEmpty(code)) {
            list = list(new QueryWrapper<Orders>().like("code", code));
        } else {
            list = list();
        }


        return list;
    }
}
